<?php $model = $this->model;?>
<form id="frmUpdateStaff">
   <div id="updateStaff" class="frm">
            <input type="hidden" id="act" name="act" value="<?=$this->act?>" />
            <input type="hidden" id="selectTree" name="selectTree" value="" />
            <input type="hidden" id="UnitParent" name="UnitParent" value="<?=$this->UnitParent?>" />
            <input type="hidden" id="StaffID" name="StaffID" value="<?=$model['StaffID']?>" />
            <fieldset>
                <legend>Cập nhật cán bộ</legend>
            <div class="row">
                <label>Tên cán bộ*</label>
                <input type="text" id="Name" name="Name" value="<?=$model['Name']?>" class="w25" required/>
            </div>
             <div class="row">
                <label>Ngày sinh</label>
                <input type="text" id="Birthday" name="Birthday" value="<?=$model['Birthday']?>" class="w25" />
                <label class="lb2">Giới tính</label>
                <select name ="Sex" id ="Sex" style="width:26%;" class="normal">
                    <option id="" value="" name="">--Chọn giới tính--</option>
                    <option id="male" value="1" name="Nam" <?= ($model['Sex'] == '1')? 'selected': '';?> >Nam</option>
                    <option id="female" value="0" name="Nữ" <?= ($model['Sex'] == '0')? 'selected': '';?> >Nữ</option>
                </select>
            </div>
            <div class="row">
                <label>Tên đăng nhập*</label>
                <input type="text" id="Username" name="Username" value="<?=$model['Username']?>" class="w25" required/>
                <label class="lb2">Mật khẩu</label>
                <input id="Password" type="password" name="Password" style="width:160px;" value="" class="w25" />
                <?php
                if ($model['StaffID']) {?>
                    <a style="text-decoration: underline;color:#001376;cursor: pointer;" id="changepass">Reset Password</a>
                <?php } ?>
            </div>
            <div class="row">
                <label>Thuộc phòng ban*</label>
                <input type="text" id="parentUnit" style="width:230px;" name="parentUnit" value="<?=$model['ParentName']?>" class="w25" required/>
                <span class="ifind imgGetDep" id="imgGetDep"></span>
                <label class="lb2" style="width:138px;">Chức vụ</label>
                <select id="PositionCode" name="PositionCode" class="normal" style="width:26%;">
                  <option value="">--- Chọn chức vụ ---</option>
                  <?= Clound_String::_generateSelectOption($this->DM14,'Code','Code','Name',$model['PositionCode']); ?>
                </select>

            </div>
             <div class="row">
                <label>Địa chỉ</label>
                <input type="text" id="Adress" name="Adress" value="" class="w70" />
            </div>
               <div class="row">
                <label>Số điện thoại</label>
                <input type="text" id="Mobile" name="Mobile" value="<?=$model['Mobile']?>" class="w25" />
                <label class="lb2">Email</label>
                <input type="email" id="Email" name="Email" value="<?=$model['Email']?>" class="w25 normal" />
            </div>
             <div class="row">
                <label>Thứ tự hiển thị*</label>
                <input type="text" id="Orders" name="Orders" value="<?=$model['Orders']?>" class="w5" required/>
                <label class="lb2" style="width:100px;">Trạng thái</label>
                <input type="checkbox" id="Status" name="Status" value="1" class="normal" <?php echo $model['Status'] ? 'checked' : '' ?>  />
                <label class="lb2" style="text-align: left; padding-left:5px;"  for="Status">Hoạt động</label>
            </div>
            <div style="padding-right: 10px;text-align:center; padding-bottom:2px;" class="row">
                <input type="submit" id="btnsavestaff" name="btnsavestaff" value="Ghi" />
                <input type="reset" id="btncancel" name="btncancel" value="Quay lai" />
            </div>
            </fieldset>
        </div>
</form>
    
</script><script>
